package com.molichuxing.gateway.api.services;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.result.ResponseResult;
import com.molichuxing.gateway.bff.order.entity.request.create.PaymentOfflineCreateVo;
import com.molichuxing.gateway.bff.order.entity.request.modify.OrderDeliverySlipModifyVo;
import com.molichuxing.gateway.bff.order.entity.response.*;
import org.springframework.validation.BindingResult;

import java.util.List;
import java.util.Map;

public interface OrderApiService {

	/**
	 * 获取经销商订单列表
	 * 
	 * @param params
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public ResponseResult<Paged<OrderDealerVo>> orderDealerList(Map<String, Object> params, Integer pageNum,
			Integer pageSize);

	/**
	 * 获取采购单信息详情 - 状态流转
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderDealerStatusInfoVo> getDealerOrderFlow(Long orderCode);

	/**
	 * 获取采购单信息详情 - 基础信息
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderDealerDetailBasicVo> orderDetailBasic(Long orderCode);

	/**
	 * 获取采购单信息详情 - 采购车辆列表
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderDealerDetailVehicleVo> orderDetailVehicle(Long orderCode);

	/**
	 * 获取采购单信息详情 -获取还款信息列表
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderDealerDetailScheduleVo>> orderSchedule(Long orderCode);

	/**
	 * 获取发车收车列表
	 * 
	 * @param orderCode
	 * @param carStatus
	 * @return
	 */
	public ResponseResult<Paged<OrderDealerDetailStartVo>> orderDealerStartList(Long orderCode, Integer carStatus);

	/**
	 * 车辆拒收
	 * 
	 * @param orderCode
	 * @param carId
	 * @param rejectReason
	 * @return
	 */
	public ResponseResult<Boolean> orderDealerCarRefuse(Long orderCode, Integer carId, String rejectReason);

	/**
	 * 保存交车单
	 *
	 * @return
	 */
	public ResponseResult<Boolean> modifyDeliverySlip(OrderDeliverySlipModifyVo orderDeliverySlipModifyVo);

	/**
	 * 获取经销商订单本期还款列表 - 还款计划
	 * 
	 * @param params
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public ResponseResult<Paged<OrderScheduleCurrentPeriodVo>> getOrderScheduleCurrentPeriodList(
			Map<String, Object> params, Integer pageNum, Integer pageSize);

	/**
	 * 获取经销商订单逾期未还款列表 - 逾期未还款
	 * 
	 * @param params
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public ResponseResult<Paged<OrderScheduleOverdueVo>> getOrderScheduleOverdueList(Map<String, Object> params,
			Integer pageNum, Integer pageSize);

	/**
	 * 获取还款信息详情 - 基础信息
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderDealerDetailBasicInfoVo> getDetailBasic(Long orderCode);

	/**
	 * 获取还款计划详情-还款计划信息
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderDealerDetailScheduleVo>> orderSchedulePlan(Long orderCode);

	/**
	 * 获取还款信息详情 - 逾期信息
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderDealerDetailScheduleVo>> orderScheduleExpire(Long orderCode);

	/**
	 * 获取订单线下支付列表(经销商支付记录列表)
	 *
	 * @param selectParams
	 * @return
	 */
	public ResponseResult<Paged<PaymentOfflineVo>> orderPaymentOfflineList(String repayType,
			Map<String, Object> selectParams);

	/**
	 * 根据线下支付id查询线下支付流水信息
	 *
	 * @param offlineId
	 *            线下支付id
	 * @return
	 */
	public ResponseResult<PaymentOfflineVo> orderPaymentOfflineFlow(Integer offlineId);

	/**
	 * 根据线下支付id获取订单排期信息
	 *
	 * @param offlineId
	 *            线下支付id
	 * @return
	 */
	public ResponseResult<List<PaymentOfflineScheduleVo>> orderPaymentOfflineSchedule(String repayType,
			Integer offlineId);

	/**
	 * 根据线下支付id查询线下支付审核信息
	 *
	 * @param offlineId
	 *            线下支付id
	 * @return
	 */
	public ResponseResult<PaymentOfflineAuditVo> orderPaymentOfflineAudit(Integer offlineId);

	/**
	 * 线下支付流水编号是否存在
	 *
	 * @param serialNumber
	 *            流水编号
	 * @return
	 */
	public ResponseResult<Boolean> orderPaymentOfflineSerialNumberExists(String serialNumber);

	/**
	 * 线下支付获取经销商下未所有还款订单
	 *
	 * 经销商id
	 * 
	 * @return
	 */
	public ResponseResult<List<OrderScheduleUnpaidVo>> getOrderScheduleUnpaid();

	/**
	 * 经销商订单支付未还款排期
	 *
	 * @param orderCode
	 *            订单号
	 * @return
	 */
	public ResponseResult<List<OrderScheduleRelationVo>> orderDealerScheduleNoRepay(Long orderCode);

	/**
	 * 新增订单线下支付
	 *
	 * @param createVo
	 * @param bindingResult
	 * @return
	 */
	public ResponseResult<Boolean> createOrderPaymentOffline(PaymentOfflineCreateVo createVo,
			BindingResult bindingResult);

	/**
	 * 获取订阅里程订单列表信息
	 * 
	 * @param selectParams
	 *            查询参数
	 * @return
	 */
	public ResponseResult<Paged<OrderSubscribeVo>> orderSubscribeList(String listType,
			Map<String, Object> selectParams);

	/**
	 * 获取订阅里程订单交易流程
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderTradeFlowVo>> orderSubscribeFlow(String listType, Long orderCode);

	/**
	 * 获取订阅里程基础信息
	 * 
	 * @param listType
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderSubscribeBaseVo>> orderSubscribeBase(String listType, Long orderCode);

	/**
	 * 获取订阅里程订单用车实况
	 * 
	 * @param listType
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderUsedCarVo> orderSubscribeUsedCar(String listType, Long orderCode);

	/**
	 * 获取订阅里程费用交易明细
	 * 
	 * @param listType
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderCostDetailsVo>> orderSubscribeCostDetails(String listType, Long orderCode);

	/**
	 * 获取专属里程订单列表信息
	 * 
	 * @param listType
	 * @param selectParams
	 * @return
	 */
	public ResponseResult<Paged<OrderExclusivelVo>> orderExclusivelList(String listType,
			Map<String, Object> selectParams);

	/**
	 * 获取专属里程订单交易流程
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderTradeFlowVo>> orderExclusivelFlow(String listType, Long orderCode);

	/**
	 * 获取专属里程订单基础信息
	 * 
	 * @param listType
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderExclusivelBaseVo> orderExclusivelBase(String listType, Long orderCode);

	/**
	 * 获取专属里程费用交易明细
	 * 
	 * @param listType
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderCostDetailsVo>> orderExclusivelCostDetails(String listType, Long orderCode);

	/**
	 * 获取专属里程还款明细
	 * 
	 * @param listType
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderExclusivelRepaymentDetailVo> orderExclusivelRepaymentDetail(String listType,
			Long orderCode);

	/**
	 * 获取专属里程本期还款计划
	 * 
	 * @param selectParams
	 * @return
	 */
	public ResponseResult<Paged<OrderRepaymentVo>> orderExclusivelCurrentPeriod(Map<String, Object> selectParams);

	/**
	 * 获取专属里程订单逾期管理
	 * 
	 * @param selectParams
	 * @return
	 */
	public ResponseResult<Paged<OrderOverdueVo>> orderExclusivelOverdue(Map<String, Object> selectParams);

	/**
	 * 获取订单还款计划列表
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<List<OrderRepaymentDetailVo>> orderRepaymentDetail(Long orderCode, Integer overdue);

	/**
	 * 根据用户id获取订单信息
	 * 
	 * @param userId
	 * @return
	 */
	public ResponseResult<List<UserOrderVo>> orderByUser(Integer userId);

	/**
	 * 根据车辆id获取订单信息
	 * 
	 * @param carId
	 * @return
	 */
	public ResponseResult<List<CarOrderVo>> orderByCar(Integer carId);

	/**
	 * 根据订单号查询合同/单据信息
	 * 
	 * @param orderCode
	 *            订单号
	 * @return
	 */
	public ResponseResult<List<OrderContractVo>> orderContract(String documentType, Long orderCode);

	/**
	 * 查询订单审核信息
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderAuditVo> getOrderAudit(Long orderCode);

	/**
	 * 查询订单交易退款信息
	 * 
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderTradeRefundVo> getOrderTradeRefund(Long orderCode);

	/**
	 * 查询订单退租信息
	 *
	 * @param orderCode
	 * @return
	 */
	public ResponseResult<OrderRenegeVo> getOrderRenege(Long orderCode, Integer userId);

}
